package csc.daonjpa.java.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;

import csc.daonjpa.java.dao.CustomerDAO;

@Controller
@SessionAttributes("loginSession")
public class LoginController {
	

	@RequestMapping(value="/setSession", method=RequestMethod.POST)	
	public ModelAndView setSessionLogin(@RequestParam String loginId) {
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("loginSession", loginId);
		
		modelAndView.setViewName("forward:/home.html");
		return modelAndView;
	}
}
